{% load widget_tweaks %}

<div class="col-md-1 sidebar__subject"></div>

<div class="col-md-8 list__subject">
    <div class="form-group row">
        <label for="{{ field.id_for_name }}" class="col-sm-2 col-form-label">{{ form.title.label }}</label>
        <div class="col-sm-10">{{ form.title|add_class:"form-control" }}</div>
    </div>
    <div class="form-group row">
        <label for="{{ field.id_for_name }}" class="col-sm-2 col-form-label">{{ form.level.label }}</label>
        <div class="col-sm-10">
            <select name="level" required="required" id="id_level" class="form-control">
                <option value="">---------</option>
                {% for i in '12345' %}
                    {% if last_level|add:1 >= forloop.counter or forloop.first %}
                        <option value="{{ forloop.counter }}"
                                {% if object.level == forloop.counter %}selected{% endif %}>
                            {{ forloop.counter }} 단계
                        </option>
                    {% endif %}
                {% endfor %}
            </select>
        </div>
    </div>
</div>

<div class="col-md-12">
    <label for="{{ field.id_for_name }}" class="col-sm-2 col-form-label">{{ form.content.label }}</label>
    <div id="editormd_id" v-pre>{{ form.media }}{{ form.content }}</div>

    <textarea name="md-imgUrl" id="md-imgUrl" rows="1" class="form-control" disabled></textarea>
</div>
